<?php

namespace beepay\request;

use beepay\Request;

/**
 * 订单创建
 *
 * @method $this withMchNo($value) 商户号
 * @method $this withAppId($value) 应用ID
 * @method $this withMchOrderNo($value) 商户订单号
 * @method $this withWayCode($value) 支付方式
 * @method $this withAmount($value) 支付金额
 * @method $this withCurrency($value) 货币代码，当前只支持cny
 * @method $this withClientIp($value) 客户端IP
 * @method $this withSubject($value) 商品标题
 * @method $this withBody($value) 商品描述
 * @method $this withNotifyUrl($value) 异步通知地址
 * @method $this withReturnUrl($value) 跳转通知地址
 * @method $this withExpiredTime($value) 订单失效时间
 * @method $this withChannelExtra($value) 特定渠道额外支付参数
 * @method $this withExtParam($value) 商户扩展参数
 * @method $this withDivisionMode($value) 分账模式： 0-该笔订单不允许分账[默认], 1-支付成功按配置自动完成分账, 2-商户手动分账(解冻商户金额)
 */
class payOrderCreate extends Request
{
    public $uri = 'api/pay/unifiedOrder';
}

/**
 * 订单查询
 *
 * @method $this withMchNo($value) 商户号
 * @method $this withAppId($value) 应用ID
 * @method $this withPayOrderId($value) 订单号
 */
class payOrderQuery extends Request
{
    public $uri = 'api/pay/query';
}

/**
 * 退款单创建
 *
 * @method $this withMchNo($value) 商户号
 * @method $this withAppId($value) 应用ID
 * @method $this withMchOrderNo($value) 商户支付单号(与支付订单号二者传一)
 * @method $this withPayOrderId($value) 支付订单号(与商户支付单号二者传一)
 * @method $this withMchRefundNo($value) 商户退款单号
 * @method $this withRefundAmount($value) 退款金额，单位分
 * @method $this withCurrency($value) 币种，目前只支持cny
 * @method $this withClientIp($value) 客户端ip
 * @method $this withRefundReason($value) 退款原因
 * @method $this withNotifyUrl($value) 异步通知地址
 * @method $this withChannelExtra($value) 渠道扩展参数
 * @method $this withExtParam($value) 商户扩展参数, 回调时原样返回
 */
class refundOrderCreate extends Request
{
    public $uri = 'api/refund/refundOrder';
}

/**
 * 退款单查询
 *
 * @method $this withMchNo($value) 商户号
 * @method $this withAppId($value) 应用ID
 * @method $this withMchRefundNo($value) 商户退款单号
 * @method $this withRefundOrderId($value) 支付系统退款订单号
 */
class refundOrderQuery extends Request
{
    public $uri = 'api/refund/query';
}

/**
 * @method PayOrderCreate payOrderCreate() 创建订单
 * @method PayOrderQuery payOrderQuery() 查询订单
 * @method RefundOrderCreate refundOrderCreate() 退款单创建
 * @method RefundOrderQuery refundOrderQuery() 退款单查询
 */
trait DefaultRequests
{
}
